package org.example.erp.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum OrderStatusEnum {
    PREPARE(0,"草稿"),
    CONFIRMED(1,"已确认"),
    APPROVING(2, "审批中"),
    WORK_ORDER_FINISHED(3,"已生成生产工单");

    @EnumValue // 将此注解标记在枚举类的字段上，表示数据库存的值是此字段的值
    @JsonValue // 将此注解标记在枚举类的字段上，表示序列化时将此字段的值返回给前端
    private final int statusCode;
    private final String desc;


    OrderStatusEnum(int statusCode, String desc) {
        this.statusCode = statusCode;
        this.desc = desc;
    }
}
